
public class Main {
    public static void main(String[] args) {

    Person p1=new Person("老王",30);
    Person p2=new Person("老李",25);

    Animal d1=new Dog();
    d1.setAge(2);
    d1.setColour("黑");
    d1.setAnimalType("狗");

    Animal c1=new Cat();
    c1.setAge(3);
    c1.setColour("灰");
    c1.setAnimalType("猫");

    p1.keepPet(d1,"骨头");
    p2.keepPet(c1,"鱼");
    }
}